<?php 
// 后台管理
class NoticeAction extends PublicAction
{

     public function insert() 
    {
		$model	=$this->getModel();
        if(false === $model->create()) {
        	$this->error($model->getError());
        }
    dump($_SESSION);
        $model->date = time();
        $model->author = $_SESSION["username"];
        //保存当前数据对象
        $id = $model->add();
        if($id) {
            //成功提示
			 $this->assign("jumpUrl",$this->getReturnUrl());
            $this->success(L('_INSERT_SUCCESS_'));
        }else { 
            //失败提示
            $this->error(L('_INSERT_FAIL_'));
        }
    }
} 
?>